<h3>备份列表</h3>
<app-delete-alert [(opened)]="showDelete" [resourceTypeName]="resourceTypeName" [items]="selected"
                  (confirm)="delete()">
</app-delete-alert>
<app-confirm-alert (confirm)="handleRestore()"></app-confirm-alert>
<clr-datagrid [clrDgSelected]="selected">
    <clr-dg-action-bar>
    <div class="btn-group">
       <button type="button" class="btn btn-sm btn-secondary"
              [disabled]="selected.length == 0 || permission==='VIEWER'"
              (click)="showDelete=true" >
        <clr-icon shape="close"></clr-icon>
        删除
      </button>
      <button type="button" class="btn btn-sm btn-secondary" [disabled]="selected.length != 1 || this.currentCluster.status === 'Ready' || permission==='VIEWER'" (click)="onRestore()">
        <clr-icon shape="backup-restore" size="16" ></clr-icon>
        恢复
      </button>
    </div>
  </clr-dg-action-bar>

  <clr-dg-column>名称</clr-dg-column>
  <clr-dg-column>备份位置</clr-dg-column>
<!--  <clr-dg-column>大小</clr-dg-column>-->
  <clr-dg-column>备份时间</clr-dg-column>

  <clr-dg-row *clrDgItems="let item of items" [clrDgItem]="item">
      <clr-dg-cell>{{item.name}}</clr-dg-cell>
      <clr-dg-cell>{{item.folder}}</clr-dg-cell>
<!--      <clr-dg-cell>{{item.size}}</clr-dg-cell>-->
      <clr-dg-cell>{{item.date_created | date: 'yyyy-MM-dd HH:mm:ss'}}</clr-dg-cell>
  </clr-dg-row>
</clr-datagrid>
